<?php

use think\migration\Migrator;
use think\migration\db\Column;

class CreateKuaizhanShortUrl extends Migrator
{
    public function up()
    {

        if (isProd()){
            $url = 'https://ymhuichong.kuaizhan.com/1193877547';
        }else{
            $url = 'https://ymhuichong.kuaizhan.com/1037644339';
        }

        \app\model\Config::findOrCreate([
            'type' => 'short_kuaizhan',
            'name' => '前端域名',
            'field' => 'short_url_jump_kuaizhan',
            'value' => $url,
        ]);
    }

    public function down()
    {
        \app\model\Config::where('type','short_url_jump_kuaizhan')->delete();
    }
}
